#ifndef BOARD_H
#define BOARD_H

#include <QObject>
#include <QDebug>

#include "boardDefinitions.h"
#include "bitutils.h"
#include "gameline.h"

/*
  The complete chess board representation
  */
class Board
{

public:
    Board();

public:
    // *** setup ***
    // all bitboards holding pieces
    U64 wK, wQ, wR, wB, wN, wP, bK, bQ, bR, bB, bN, bP;
    // additional "useful" bitboards
    U64 wPieces, bPieces, occupiedSquares;

    // *** material ***
    // total material on board in centipawns (white's position)
    int material;

    // *** gameline ***
    GameLine gameLine;

    // *** info ***
    bool sideToMove; // white is true/ black is false
    // en passant square - keeps in memory, whether we can capture en-passant
    int enPassantSquare;
    // castling
    bool wCanCastle00;
    bool wCanCastle000;
    bool bCanCastle00;
    bool bCanCastle000;
    // fifty move rule missing
    // size_t fiftyMoveCountDown

    // *** methods - public?! for some called by GUI ***
    // clear board
    void clear();
    // bring board to initial setup position
    void init();
    // set some piece ( type, pos )
    void setPiece(unsigned char, U64);

    void updateAdditionalBitboards();
};

#endif // BOARD_H
